/**
 *  getch()
 *  pocka na stisk klavesy
 *  vrati jeji ASCII hodnotu (ve spodnim bajtu)
 *  a atribut klavesy (ve vrchnim bajtu)
 */
unsigned int getch() {
  char _char, _attr;

  asm xor ax, ax;
  asm int 0x16;

  asm mov _char, al;
  asm mov _attr, ah;

  /* nahrazovani znaku... */
  if(_char == 'z')
    _char = 'y';
  else if(_char == 'Z')
    _char = 'Y';
  else if(_char == 'y')
    _char = 'z';
  else if(_char == 'Y')
    _char = 'Z';
  /*else if(_char == '/')
    _char = '-';*/
  else if(_char == '?')
    _char = '_';
  else if(_char == '\'')
    _char = '§';
  else if(_char == '"')
    _char = '!';
  else if(_char == ':')
    _char = '"';
  else if(_char == '`')
    _char = ';';
  /*else if(_char == '-')
    _char = '=';*/
  else if(_char == '_')
    _char = '%';
  else if(_char == '{')
    _char = '/';
  else if(_char == '}')
    _char = '(';
  else if(_char == ']')
    _char = ')';
  else if(_char == '>')
    _char = ':';
  else if(_char == '<')
    _char = '?';

  return ((_attr << 8) | _char);
}
